<?php
declare (strict_types=1);

namespace app\course\service\cert;

use app\common\service\BaseService;
use think\annotation\Inject;
use think\facade\Request;
use app\course\logic\base\CourseCert;
use think\Response;

class Cert extends BaseService
{

    /**
     * @Inject()
     * @var CourseCert
     */
    protected $certLogic;

    /**
     * 获取我的证书列表
     * Author   亓官雨树<lucky.max@foxmail.com>
     * Date     22/04/14
     *
     * @return Response
     */
    public function getMyCert(): Response
    {
        $param = Request::get();
        $data  = $this->certLogic->getMyCert($param);

        return static::parseToData($data, 1, '获取成功');
    }

    /**
     * 获取证书详情
     * Author   亓官雨树<lucky.max@foxmail.com>
     * Date     22/04/14
     *
     * @return Response
     */
    public function getCertDetail(): Response
    {
        $param = Request::get();
        $data  = $this->certLogic->getCertDetail($param);

        return static::parseToData($data, 1, '获取成功');
    }
}